import book.BookList;
import operation.*;
import user.AdminUser;
import user.NormerUser;
import user.User;
import java.util.Scanner;
public class Test {
    //验证管理员操作
    //测试所有图书操作
    //测试用户操作
   public static void main(String[] args) {
        BookList bookList = new BookList();
        User adminUser = new AdminUser("付");
        /*
        while(true) {
            int choice = adminUser.menu();
            //根据菜单返回的choice进行操作
            adminUser.doOperation(choice,bookList);
        }*/
        //-----------------------------------------//
      /*  IOperation[] iOperation = new IOperation[] {
                new ExitOperation(),
                new AddOperation(),
                new DeleteOperation(),
                new BorrowOperation(),
                new FindOperation(),
                new ShowOperation(),
                new ReturnOperation()
        };
        int choice = 0;
        System.out.println("**********************");
        System.out.println("1.新增图书");
        System.out.println("2.删除图书");
        System.out.println("3.借阅图书");
        System.out.println("4.查找图书");
        System.out.println("5.展示图书");
        System.out.println("6.归还图书");
        System.out.println("0.退出系统");
        System.out.println("**********************");
        System.out.println("请输入你的操作:");
        Scanner scanner = new Scanner(System.in);
        while(true) {
            choice = scanner.nextInt();
            iOperation[choice].work(bookList);
        }*/
        //--------------------------------------------------//
        User user = new NormerUser("normal");
        while(true) {
            int choice = user.menu();
            user.doOperation(choice,bookList);
        }
    }
}